package net.maku.module.query;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.maku.module.entity.AgCategoryPermission;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@TableName("系统用户管理栏目(AgCategoryPermission)参数类")
@Data
public class AgCategoryPermissionQuery implements Serializable {

    @Schema(description = "角色id（唯一）")
    private Long sysRoleId;


    @Schema(description = "栏目id")
    private String categoryIds;


    public AgCategoryPermission makeCreateEntity(long executor) {
        AgCategoryPermission categoryPermission = new AgCategoryPermission();
        BeanUtils.copyProperties(this, categoryPermission);
        categoryPermission.setCreator(executor);
        return categoryPermission;
    }

    public AgCategoryPermission makeUpdateEntity(AgCategoryPermission categoryPermission,
                                                 long executor) {
        BeanUtils.copyProperties(this, categoryPermission);
        categoryPermission.setUpdater(executor);
        return categoryPermission;
    }

}
